import React from 'react'
import { Button, Tag } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import ProTable from '@ant-design/pro-table';
import request from '@/utils/request'
export default () => {


    const columns: any = [
        {
            title: '店铺名称',
            dataIndex: 'store_title',
        },
        {
            title: '店铺等级',
            render: (text: any) => <Tag color="cyan">{text} </Tag>,
            align: "center",
            dataIndex: 'level_title',
            hideInSearch: true,
            valueType: "money"
        },
        {
            title: '主营行业',
            render: (text: any) => <Tag color="green">{text} </Tag>,
            dataIndex: 'industry_title',
            align: "center",
            hideInSearch: true,
        },
        {
            title: '申请账号',
            render: (text: any) => <Tag color="green">{text} </Tag>,
            dataIndex: 'apply_account',
            align: "center",
            hideInSearch: true,
        },

        {
            title: '入驻时长',
            render: (text: any) => <Tag color="green">{text} </Tag>,
            dataIndex: 'settle_duration',
            align: "center",
            hideInSearch: true,
        },
        {
            title: '入驻费用',
            dataIndex: 'settle_fee',
            align: "center",
            hideInSearch: true,
            valueType: "money"
        },
        {
            title: '申请时间',
            render: (text: any) => <Tag color="green">{text} </Tag>,
            dataIndex: 'apply_at',
            align: "center",
            hideInSearch: true,
        },
        {
            title: '申请状态',
            render: (text: any) => <Tag color="green">{text} </Tag>,
            dataIndex: 'audit_status',
            align: "center",
            hideInSearch: true,
        },
        {
            title: '操作',
            align: "center",
            render: (text: any, record: any) => (
                <>
                    <Button size="small" type="primary" ghost style={{ marginRight: "6px" }}>编辑</Button>
                    <Button size="small" danger>删除</Button>
                </>
            ),
        },
    ];

    return (
        <PageHeaderWrapper title={false}>
            <ProTable<any>
                options={false}
                toolBarRender={false}
                headerTitle={null}
                rowKey="id"
                columns={columns}
                request={(params: any) => request('/store/apply-list', {
                    params,
                })}
                tableAlertRender={false}
            />
        </PageHeaderWrapper>
    )
}